<template>
  <view class="body">
    <view class="container">
      <view class="box">
        <view class="inner">
          <view class="box_title">添加</view>
          <view class="box_inner" @click="edit">
            <view class="text">手动添加</view>
          </view>
        </view>

        <!-- <view class="box_title">模板</view>
        <view>
          <view v-for="(item, index) in mode" :key="index">
            <view class="model" @click="goback(item)">
              <view class="box_inner" >{{
                item.title ? item.title : "-"
              }}</view>
            <view style="padding-left:20upx">
                 <view>列表里的选项有</view>
              <ul v-for="(choose, index) in item.list" :key="index">
                <li>{{ choose.name }}</li>
              </ul>
            </view>
            </view>
          </view>
        </view> -->
        <mode-list></mode-list>
      </view>
    </view>
  </view>
</template>
<script>
// import uniSwipeAction from "@/components/uni-swipe-action/uni-swipe-action.vue";
// import uniSwipeActionItem from "@/components/uni-swipe-action-item/uni-swipe-action-item.vue";
import modeList from "@/components/modeList/modeList.vue";
export default {
  // components: { uniSwipeAction, uniSwipeActionItem },
  components: { modeList },
  onLoad() {},
  data() {
    return {
    //   mode: [
    //     {
    //       title: "衣服题目",
    //       list: [
    //         { name: "衣服1" },
    //         { name: "衣服2" },
    //         { name: "衣服3" },
    //         { name: "衣服4" },
    //       ],
    //     },
    //     {
    //       title: "被子题目",
    //       list: [
    //         { name: "被子1" },
    //         { name: "被子2" },
    //         { name: "被子3" },
    //         { name: "被子4" },
    //       ],
    //     },
    //     {
    //       title: "床单题目",
    //       list: [
    //         { name: "床单1" },
    //         { name: "床单2" },
    //         { name: "床单3" },
    //         { name: "床单4" },
    //         { name: "床单5" },
    //       ],
    //     },
    //     {
    //       title: "啊啊题目",
    //       list: [
    //         { name: "啊啊1" },
    //         { name: "啊啊2" },
    //         { name: "444" },
    //         { name: "444" },
    //         { name: "4444" },
    //       ],
    //     },
    //   ],
    };
  },
  methods: {
    edit() {
      uni.navigateTo({
        url: "./edit",
      });
    },
    goback(item) {
      console.log(11);
      uni.setStorageSync("item", JSON.stringify(item));
      uni.switchTab({
        url: `/pages/decision/index`,
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.body {
  width: 100%;
  height: 100%;
  .container {
    width: 100%;
    height: 100%;
  }
}
.box {
  .inner{
     width: 90%;
  margin-left: 5%;
  }
  .box_title {
    margin: 20upx 0;
  }
  .box_inner {
    width: 100%;
    height: 100upx;
    display: flex;
    align-items: center;
    justify-content: left;
    border-radius: 20upx;
    background: rgb(210, 200, 169);
    margin: 25upx 0;
    padding-left: 5%;
    width: 95%;

    .text {
      width: 95%;
      // margin-left: 5%;
    }
  }
}
// .model{
//   background-color: rgb(249, 205, 173);

// }
</style>